package com.depository.oss.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping(value="/test")
public class TestRedisController {
    @Autowired private SendMessage sendMessage;

    @Autowired
    private RedisTemplate redisTemplate;

    @RequestMapping(value="/redis")
    public void redis() throws InterruptedException {
        for (int i = 1; i <501; i++) {
                sendMessage.sendMessage("testquere","a"+i);
        }
        /*RedisLock lock = new RedisLock(redisTemplate, "test", 10000, 20000);
        System.out.println(lock.lock());*/
    }
}
